package com.jinhongone.pattern.behavior.strategy;

/**
 * @author jinho
 * @className SaleMan
 * @description 策略模式-环境类：聚合抽象策略类，对外部提供策略
 * @date 2025/3/28 10:50
 */
public class SaleMan {
    private Strategy strategy;

    public SaleMan(Strategy strategy) {
        this.strategy = strategy;
    }

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    /*对外提供 策略功能*/
    public void saleStrage() {
        strategy.sailStrategy();
    }
}
